
# Copyright 2003-2005 (c) Live Media Pty Ltd. <argot@einet.com.au> 
#
# This software is licensed under the Argot Public License 
# which may be found in the file LICENSE distributed 
# with this software.
# 
# More information about this license can be found at
# http://www.einet.com.au/License
#
# The Developer of this software is Live Media Pty Ltd,
# PO Box 4591, Melbourne 3001, Australia.  The license is subject 
# to the law of Victoria, Australia, and subject to exclusive 
# jurisdiction of the Victorian courts.
#

#DEBUG=yes
#STDANSI=0


TYPEINC = -I../src/

CC=gcc
AS=as
AR=ar
LD=ld

ifdef DEBUG
  NOINLINE=1
  CFLAGS=-Wall -g -fno-inline -DNOINLINE -DDEBUG
else
  ifdef STDANSI
    CFLAGS=-Wall -ansi -O2 -pedantic -DSTDANSI
  else
    ifdef NOINLINE
      CFLAGS=-Wall -g -O2 -fno-inline -DNOINLINE    
    else
      CFLAGS=-Wall -O2
    endif
  endif
endif


all: TypeUnitTest.exe

clean: 
	rm -f src/*.o
	rm -f src/data/*.o
	rm -f src/message/*.o
	rm -f src/network/*.o
	

TEST = src/TypeLibraryTest.o \
	   src/TestTypeElement.o \
	   src/Main.o \
	   src/data/MixedData.o \
	   src/message/MessageTest.o \
	   src/network/TypeNetworkTest.o


TypeUnitTest.exe: $(TEST)
	$(CC) -g -L .. -L /usr/local/lib -o TypeUnitTest.exe $(TEST) -lcppunit -largot -lstdc++

%.o: %.cpp
	@echo "-------------------------------------------------"
	$(CC) -c $(CFLAGS) $(TYPEINC) -o $@ $<

%.o: %.c
	@echo "-------------------------------------------------"
	$(CC) -c $(CFLAGS) $(TYPEINC) -o $@ $<
